<?php
/**
 * User: @lose
 * Date: 2020-04-01
 * Time: 17:26
 */


use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/ImageCreate',
    'namespace' => 'Frieza\\Modules\\ImageCreate\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('/{id}/edit/{tabType}', 'IndexController@pageEdit'); // 修改模板
    $router->post('/imageId/{id}/uploadFileToCreate', 'IndexController@uploadFileToCreate'); // 上传文件进行图片生成
    $router->get('/', 'IndexController@index');
    $router->get('/create', 'IndexController@pageEdit'); // 新增模板
    $router->delete('/{id}', 'IndexController@deleteTemplate'); // 删除模板
    $router->post('/onlineTemplate', 'IndexController@onlineTemplate'); // 恢复模板正常
    $router->get('/{id}/preview', 'IndexController@preview');// 模板效果预览
    $router->post('/saveBasicInfo', 'IndexController@saveBasicInfo'); // 保存模板基本信息
    $router->get('/{id}/edit/{tabType}/add/{type}', 'IndexController@moduleAdd'); // 模块添加
    $router->post('/imageId/{id}/moduleId/{moduleId}/addImgModule', 'IndexController@addImgModule'); // 图片模块 添加
    $router->post('/imageId/{id}/moduleId/{moduleId}/addAvatarModule', 'IndexController@addAvatarModule'); // 头像模块 添加
    $router->post('/imageId/{id}/moduleId/{moduleId}/addQrModule', 'IndexController@addQrModule');// 二维码模块 添加
    $router->post('/imageId/{id}/moduleId/{moduleId}/addTextModule', 'IndexController@addTextModule'); // 文本模块 添加
    $router->post('/imageId/{id}/moduleId/{moduleId}/addZipNameModule', 'IndexController@addZipNameModule'); // Zip模块 添加
    $router->get('/{id}/edit/edit/{moduleId}/edit/{moduleType}/type', 'IndexController@moduleEdit'); // 具体某个模块修改
    $router->post('/{id}/edit/sort', 'IndexController@sort'); // 模块排序
    $router->delete('/{id}/edit/{tabId}/{moduleId}', 'IndexController@deleteModuleInfo'); // 删除某个模块
    $router->get('/{id}/{imageCreateId}/download/urlList', 'IndexController@downloadUrlList'); // 下载图片生成url列表
    $router->get('/{id}/download/template', 'IndexController@downloadTemplate'); // 模板下载
    $router->get('/{id}/{imageCreateId}/download/zipImg', 'IndexController@downloadZipImg'); // 压缩包下载
});